<?php if(!defined('EMLOG_ROOT')) {exit('error!');}?>
<div class="articleHead ui-bar ui-bar-c">
	<h3>
		<span class="threadType"  style="font-size:12px;">
	        <a href="./?post=<?php echo $value['gid']; ?>" data-transition="none">[<?php echo $log_title; ?>]</a>
	<span class="deadLine"  style="font-size:10px;">-<?php echo gmdate('Y-n-j', $date); ?></span>
    </span>
    </h3>
    <span class="countBox">浏览:<?php echo $views; ?> / 回复:<?php echo $comnum; ?></span>
</div>
   <div data-role="content" class="contentDiv">
	        	<div class="user" style="border:none">
        		<span class="userFloor">
            	<em>楼主</em>
                </span>
  <?php echo $log_content; ?>
			</div>	
  <?php if($commentPageUrl) { ?>
<div class="ui-bar ui-bar-c arrayBtn" data-position="inline" >
<div id="pagenavi">
<?php echo $commentPageUrl;?>
</div>
</div>
<?php } ?>
 <li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-bar-b">评论列表</li>
<?php
	$comnum = count($comments);
	$i= $comnum - ($commentPage - 1)*Option::get('comment_pnum');
	foreach((array)$commentStacks as $cid):
    $comment = $comments[$cid];
	$comment['poster'] = $comment['url'] ? '<a href="'.$comment['url'].'" target="_blank">'.$comment['poster'].'</a>' : $comment['poster'];
?>
<div data-role="content" class="contentDiv">
        	<div class="user" >
        		<span class="userFloor">
            	<em><?php if($i == '1')
{echo '沙发';}
elseif($i == '2'){echo '板凳';}
elseif($i == '3'){echo '地毯';}
else{echo '#'.$i;}?></em>
                </span>
				<?php if($isGravatar == 'y'): ?>
            	<span class="userAvatar">
				<img src="<?php echo getGravatar($comment['mail']); ?>">
				</span>
				<?php endif; ?>
            	<span class="userName">
                	<a href=""  data-transition="none"><?php echo $comment['poster']; ?></a>
                </span>
                	<br/>
                <span class="userBtn">
                	<a href="<?php echo $comment['url'];?>" target="_blank rel="nofollow" data-transition="none">主页</a>
                    <a href="./?action=reply&cid=<?php echo $comment['cid'];?>" title="回复" data-transition="none">回复</a>
				</span>
              </div>
            <div class="pbody">
			 <div id="postmessage_$post[pid]" class="postmessage"><?php echo preg_replace("/\{smile:(([1-4]?[0-9])|50)\}/",'<img src="'.BLOG_URL.'content/plugins/face/face/$1.gif"  />',$comment['content']); ?>
			 </div>
			 </div>
<?php $i--; endforeach; ?>
<?php if($commentPageUrl) { ?>
<div class="ui-bar ui-bar-c arrayBtn" data-position="inline" >
<div id="pagenavi">
<?php echo $commentPageUrl;?>
</div>
</div>
<?php } ?>
<li data-role="list-divider" role="heading" class="ui-li ui-li-divider ui-bar-b">
<?php if(ISLOGIN == true):?>当前已登录为：<?php echo $user_cache[UID]['name']; ?>
<?php else: ?>评论
<?php endif; ?>
</li>
<div data-role="content">
		<form method="post" action="./index.php?action=addcom&gid=<?php echo $logid; ?>">
		<?php if(ISLOGIN !== true):?>
		昵称<br /><input type="text" name="comname" value="" /><br />
		邮件地址 (选填)<br /><input type="text" name="commail" value="" /><br />
		个人主页 (选填)<br /><input type="text" name="comurl" value="" /><br />
		<?php endif; ?>
		<textarea name="comment" rows="10"></textarea>
		<input type="submit" name="replysubmit" value="回复"  />
		<?php echo $verifyCode; ?>
		</form>
</div>
